<template>
    <div>
        <!-- 作用域插槽支持起名字 -->
        <slot :mylist="dataList" a="1" b="2" name="movie">
            <ul>
                <li v-for="(item, index) in dataList" :key="item.id">
                    {{ item.nm }}
                </li>
            </ul>
        </slot>
        <!-- <slot></slot> -->
    </div>
</template>

<script>
import axios from 'axios'
export default {
    data() {
        return {
            dataList: []
        }
    },
    mounted() {
        // fetch("test.json").then(res => res.json()).then(res => {
        //     console.log(res);
        // })

        axios.get("test.json").then(res => {
            console.log(res.data);
            this.dataList = res.data.data.hot
        })
    }
}
</script>